<template>
  <div>
    <header class="ex">
      <h3>
        <span class="b">{{ rulefrom.GoodName }}</span>
        <button @click="toshop(rulefrom.GoodId)">购买</button>
      </h3>
    </header>
    <div class="aaa">
      <h1>{{ rulefrom.GoodName }}</h1>
      <h2>5G概念手机</h2>
      <h3>{{ rulefrom.GoodArea }}</h3>
      <h1>￥{{ rulefrom.GoodPrice }}</h1>
    </div>
    <div class="bbb"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      rulefrom: {
        GoodId:'',
      GoodName:'',
      GoodPrice:'',
      GoodArea:'',
      GoodBanben:'',
      GoodColor:'',
      GoodImg:'',
      GoodCount:''
      },
    };
  },
  methods: {
    toshop(GoodId) {
      this.$router.push("/xiangqing/"+GoodId);
    },
    geteditgood() {
      this.$axios
        .get(
          `http://localhost:13443/api/Goods/EditGood?GoodId=${this.$route.params.GoodId}`
        )
        .then((res) => {
          this.rulefrom = res.data;
        });
    },
  },
  created() {
    this.geteditgood();
  },
};
</script>

<style>
.a {
  width: 1400px;
  height: 800px;
}
.b {
  padding-right: 1300px;
}
.aaa {
  background: url(/Images/product-bg-1.png);
  height: 718px;
  text-align: center;
}
.bbb {
  background: url(/Images/max-01.png);
  height: 2300px;
  text-align: center;
}
.ex {
  display: inline-block;
}
</style>